package com.ysd.entity;

import java.math.BigDecimal;

/**
 * 订单
 * 
 * @author dzj20
 *
 */
public class Order {
	private Integer o_id; // 订单编号
	private Integer bookId; // 书id,外键
	private Integer userId;  // 用户id,外键
	private BigDecimal totalMoney; // 总金额
	private String status; // 状态,如:已付款,未付款
	private Integer number; // 数量
	private String orderDate; // 下单时间
	private String orderAddress; // 地址,外键

	private String uName;//用来后台订单多条件查询
	private User user;
	private Books books;
	private Address address;
	private Integer page;
	private Integer limit;

	
	public String getuName() {
		return uName;
	}

	public void setuName(String uName) {
		this.uName = uName;
	}

	public Order(Integer o_id, Integer bookId, Integer userId, BigDecimal totalMoney, String status, Integer number,
			String orderDate, String orderAddress, String uName, User user, Books books, Address address, Integer page,
			Integer limit) {
		super();
		this.o_id = o_id;
		this.bookId = bookId;
		this.userId = userId;
		this.totalMoney = totalMoney;
		this.status = status;
		this.number = number;
		this.orderDate = orderDate;
		this.orderAddress = orderAddress;
		this.uName = uName;
		this.user = user;
		this.books = books;
		this.address = address;
		this.page = page;
		this.limit = limit;
	}

	public Order(Integer o_id, Integer bookId, Integer userId, BigDecimal totalMoney, String status, Integer number,
			String orderDate, String orderAddress, User user, Books books, Address address, Integer page,
			Integer limit) {
		super();
		this.o_id = o_id;
		this.bookId = bookId;
		this.userId = userId;
		this.totalMoney = totalMoney;
		this.status = status;
		this.number = number;
		this.orderDate = orderDate;
		this.orderAddress = orderAddress;
		this.user = user;
		this.books = books;
		this.address = address;
		this.page = page;
		this.limit = limit;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getLimit() {
		return limit;
	}

	public void setLimit(Integer limit) {
		this.limit = limit;
	}

	public Integer getO_id() {
		return o_id;
	}

	public void setO_id(Integer o_id) {
		this.o_id = o_id;
	}

	public Integer getBookId() {
		return bookId;
	}

	public void setBookId(Integer bookId) {
		this.bookId = bookId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public String getOrderAddress() {
		return orderAddress;
	}

	public void setOrderAddress(String orderAddress) {
		this.orderAddress = orderAddress;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Books getBooks() {
		return books;
	}

	public void setBooks(Books books) {
		this.books = books;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public Order(Integer o_id, Integer bookId, Integer userId, BigDecimal totalMoney, String status, Integer number,
			String orderDate, String orderAddress, User user, Books books, Address address) {
		super();
		this.o_id = o_id;
		this.bookId = bookId;
		this.userId = userId;
		this.totalMoney = totalMoney;
		this.status = status;
		this.number = number;
		this.orderDate = orderDate;
		this.orderAddress = orderAddress;
		this.user = user;
		this.books = books;
		this.address = address;
	}

	public Order() {
		super();
	}

	@Override
	public String toString() {
		return "Order [o_id=" + o_id + ", bookId=" + bookId + ", userId=" + userId + ", totalMoney=" + totalMoney
				+ ", status=" + status + ", number=" + number + ", orderDate=" + orderDate + ", orderAddress="
				+ orderAddress + ", uName=" + uName + ", user=" + user + ", books=" + books + ", address=" + address
				+ ", page=" + page + ", limit=" + limit + "]";
	}

	

	

}
